<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加商品信息</title>

</head>
    <body>
    	<form action="${pageContext.request.contextPath }/items/addItemsSubmit.action" method="post"
    		enctype="multipart/form-data">
    		<label>商品类型</label>
    		<input type="text" name="items.producttype"/>
    		<br/>
    		<label>商品名称</label>
    		<input type="text" name="items.name"/>
    		<br/>
    		<label>商品价格</label>
    		<input type="text" name="items.price"/>
    		<br/>
    		<label>商品大缩略图</label>
    		<c:if test="${items.pic1 !=null}">
			<img src="/pic/${items.pic1}" width=100 height=100/>
			<br/>
			</c:if>
    		<input type="file" name="pic1"/>
    		<br/>
    		<label>商品小缩略图</label>
    		<c:if test="${items.pic2 !=null}">
			<img src="/pic/${items.pic2}" width=100 height=100/>
			<br/>
			</c:if>
    		<input type="file" name="pic2"/>
    		<br/>
    		<label>商品简介</label>
    		<textarea rows="3" cols="30" name="items.detail"></textarea>
    		<br/>
    		<input type="submit" value="提交"/>
    	</form>
 	</body>
</html>